<div id="page-wrapper">
    <div class="row headline" >
        <div class="col-md-12 headline-title" >
            <h3>学员招生 <img src="assets/img/angle-right.png" alt="" class="tubiao"></h3><h4>班课合同</h4>
        </div>
    </div>
    <div class="row createbutton" >
        <div class="col-md-1" >
            <button class="search-content" style="background: #4da1ff;color: #fff;	box-shadow: #84bdff 0px 0px 8px;" data-toggle="modal" data-target="#createContract">创建合同</button>
        </div>
        <div class="col-md-2" ng-if="admin==true">
            <schoolcampus></schoolcampus>
        </div>
        <div class="col-md-1" ng-if="admin==true">
            <button class="search-content" style="background: #4da1ff;color: #fff;	box-shadow: #84bdff 0px 0px 8px;" ng-click="find()">查询</button>
        </div>
    </div>
    <div>
        <table class="table ">
            <thead class="yuangong">
            <tr>
                <th>编号</th>
                <th>合同名称</th>
                <th>学员卡号</th>
                <th>学员姓名</th>
                <th>应缴学费</th>
                <th>实缴学费</th>
                <th>学费欠费</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody class="xuhao">
            <tr ng-repeat="data in datas ">
                <td>{{data.pact_sn}}</td>
                <td>{{data.name}}</td>
                <td>{{data.student_sn}}</td>
                <td>{{data.student_name}}</td>
                <td>{{data.tuition_should}}</td>
                <td>{{data.tuition_reality}}</td>
                <td>{{data.tuition_lack}}</td>
                <td>
                    <span ng-if="data.tuition_lack<=0 ||data.tuition_lack==null || data.tuition_lack==undefined" ><a class="operation" href="#/transfer-daily/{{data.id}}/{{data.class_name}}/{{data.class_id}}"><i class="iconfont icon-kecheng"></i>报课</a></span>
                    <span class="operation" data-toggle="modal"  ng-click="drops($index)"><i class="iconfont icon-tuike"></i>退课</span>
                    <span class="operation" data-toggle="modal" ng-click="supplementary($index)"><i class="fa fa-cny"></i>补交</span>
                    <a href="#/reviseclass/{{data.id}}/{{data.class_name}}" class="operation"><i class="fa fa-edit"></i>修改</a>
                    <a class="operation" href="#/checkclass/{{data.id}}/{{data.class_name}}"><i class="fa fa-file-text"></i>查看</a>
                    <!--<span class="operation fa fa-trash-o" ng-click="delete($index)">删除</span>-->
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!--创建合同-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="createContract" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">创建合同</span></h2>
                    </div>
                    <form>
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr class="paikeconter">
                                    <td  height="52">合同名称</td>
                                    <td>学员卡号</td>
                                    <td>&nbsp</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee"  ng-model="contractname">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee"  ng-model="student_sn">
                                    </td>
                                    <td>
                                        <div style="margin:0 auto;width: 80%;" >
                                        <button type="button" class="btn btn-primary" style="float:left" ng-click="detect()">检测卡号</button><div class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee;float:right;width: 60%;" id="prompting"></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr class="paikeconter">
                                    <td height="52">所报班级</td>
                                    <td>负责人职务</td>
                                    <td>负责人姓名</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <createclass></createclass>
                                    </td>
                                    <td>
                                        <select class="tankuang" id="presonposition">
                                            <option value=""  disabled selected style="display: none;"></option>
                                            <option value="3">教务</option>
                                            <option value="1">咨询</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select class="tankuang" id="presonname"></select>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="addstudent()">保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!--报课单-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="dailyCourse" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">创建报课单</span></h2>
                    </div>
                    <form method="post">
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52" style="width: 100px;font-size: 24px">报课单编号：</td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee"  ng-model="applyTheClass">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52" >
                                        <select class="tankuang">
                                            <option value="" disabled selected style="display: none;">17春季物化生冲刺班</option>
                                            <option>17春季物化生冲刺班</option>
                                            <option>17春季物化生冲刺班</option>
                                        </select>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <table width="100%">
                                <tbody class="class-daily">
                                <tr class="paikeconter">
                                    <td  height="52" >科目</td>
                                    <td>单价</td>
                                    <td>节数</td>
                                    <td>老师</td>
                                    <td>时/次（每次小时数）</td>
                                    <td>学费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td  height="52" >
                                        <select class="tankuang-tf"  >
                                            <option value="" disabled selected style="display: none;">语文</option>
                                            <option>语文</option>
                                            <option>语文</option>
                                        </select>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff"  ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #edf5ff;border: 1px solid #f2faff" ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #eae7ff;border: 1px solid #e7e8ff"  ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="button" value="增加" style="width: 50px;" id="addBtn">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <table width="100%">
                                <tbody class="modal-tf">
                                <tr>
                                    <td height="52">缴费方式</td>
                                    <td height="52">实际缴费</td>
                                    <td height="52">总学费</td>
                                    <td height="52">欠费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td height="52">
                                        <select class="tankuang-tf" >
                                            <option value="" disabled selected style="display: none;"></option>
                                            <option>现金</option>
                                            <option>支付宝</option>
                                            <option>现金</option>
                                        </select>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"   style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="applyTheClass">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="52">校长</td>
                                    <td height="52">学生/家长</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="applyTheClass">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="applyTheClass">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" >保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!--退课单-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="withdraw" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">退课</span></h2>
                    </div>
                    <form >
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52" width="16.66666666666666%">科目</td>
                                    <td width="16.66666666666666%">单价</td>
                                    <td width="16.66666666666666%">实报节数</td>
                                    <td width="16.66666666666666%">已上节数</td>
                                    <td width="16.66666666666666%">退课节数</td>
                                    <td width="16.66666666666666%">收据单号</td>
                                </tr>
                                <tr class="paikeconter" ng-repeat="drop in drops_data">
                                    <td height="52">{{drop.subject_name}}</td>
                                    <td>{{drop.price}}</td>
                                    <td>{{drop.number}}</td>
                                    <td>{{drop.number_use}}</td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff; width: 100px;"  id="drop_{{drop.id}}" >
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff;width: 100px;"  id="record_sn">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <table width="100%">
                                <tbody class="modal-tf">
                                <tr>
                                    <td height="52">总费用</td>
                                    <td height="52">退课前折扣</td>
                                    <td height="52">退课前减免</td>
                                    <td>应缴费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" value="{{drop_text.tuition_total}}" id="tuition_total">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"   style="background:#fffae7;border: 1px solid #FDF3CC;" value="{{drop_text.sale_name}}" id="sale_name" data="{{drop_text.sale_id}}">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"   style="background:#fffae7;border: 1px solid #FDF3CC;" value="{{drop_text.sale_derate}}" id="sale_tuition">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"   style="background:#fffae7;border: 1px solid #FDF3CC;" value="{{drop_text.tuition_should}}" id="tuition_should">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="52">实际缴费</td>
                                    <!--<td height="52">消耗用费</td>-->
                                    <td height="52">调档后折扣</td>
                                    <td>调档后减免</td>
                                    <td height="52">应退费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{drop_text.tuition_reality}}" id="tuition_reality">
                                    </td>
                                    <!--<td>-->
                                        <!--<input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee"  id="tuition_use">-->
                                    <!--</td>-->
                                    <td>
                                        <saleclass></saleclass>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee"   ng-model="after_sale_derate">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="tuition">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="drop_save()">保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!--补交-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="pay" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">补交</span></h2>
                    </div>
                    <form >
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52">应缴学费</td>
                                    <td>实缴学费</td>
                                    <td>学费欠费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td height="52">
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{prod.tuition_total}}" id="prodtuition_total">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{prod.tuition_reality}}" id="prodtuition_reality">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{prod.tuition_lack}}" id="prodtuition_lack">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">本次补缴</td>
                                    <td>缴费方式：</td>
                                    <td>收据单号：</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="nowsupplementary">
                                    </td>
                                    <td>
                                        <div class="tankuang" style="margin: 0 auto"><methodstyle></methodstyle></div>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="record_sn">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="increase()">保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>


    <!--翻页-->
    <div ng-if="myPage.totalItems" my-pagination pg="myPage"></div>
</div>
<!-- /. PAGE INNER  -->

